<script setup lang="ts">
import { getChannelsListAPI } from '@/apis/card';
import type { ChannelsList } from '@/types/article';
import { ref } from 'vue';

const channel_id = ref('')
const getChannlesList = ref<ChannelsList[]>()
const getArticleList = async ()=>{
  const res = await getChannelsListAPI()
  console.log('res',res.data.data);
  getChannlesList.value = res.data.data.channels
}
getArticleList()
</script>
<template>
  <el-select v-model="channel_id" placeholder="请选择频道" style="width: 200px;" clearable>
    <el-option v-for="item in getChannlesList" :key="item.id" :value="item.id" :label="item.name"></el-option>
  </el-select>
</template>

<style scoped>
/* 样式 */

</style>
